//
//  YWPatrolPointRecord.h
//  maintain
//
//  Created by Kyo on 16/2/22.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YWPatrolLine;
@class YWLocation;
@class YWHandler;

typedef NS_ENUM(NSUInteger, YWPatrolPointRecordUploadStatus) {
    YWPatrolPointRecordUploadStatusNull = 0,
    YWPatrolPointRecordUploadStatusUploading = 1,
    YWPatrolPointRecordUploadStatusFinished = 2, //上传
    YWPatrolPointRecordUploadStatusUnFinished = 3 //未上传
};

typedef NS_ENUM(NSUInteger, YWPatrolpointRecordStatus) {
    YWPatrolpointRecordStatusNormal = 0, //正常
    YWPatrolpointRecordStatusTrouble = 1, //故障
};

@interface YWPatrolPointRecord : NSObject
/**巡更线路ID*/
@property (nonatomic, assign) NSInteger patrolLineId;
/**巡更线记录标识*/
@property (nonatomic, copy) NSString* uniqueTag;
/**巡更明细唯一ID（关联报障信息）*/
@property (nonatomic, copy) NSString *detailUniqueTag;
/**巡更点记录ID*/
@property (nonatomic, copy) NSString* patrolpointRecordId;
/**状态(故障，正常)*/
@property (nonatomic, assign) YWPatrolpointRecordStatus status;
/**位置ID*/
@property (nonatomic, assign) NSInteger locationId;
/**位置的先后排序*/
@property (nonatomic, assign) NSInteger sort;
/**巡更完成时间*/
@property (nonatomic, assign) NSTimeInterval patrolTime;
/**巡更备注*/
@property (nonatomic, copy) NSString* note;
/**执行人*/
@property (nonatomic, strong) YWHandler *executor;
/**上传状态*/
@property (nonatomic, assign) YWPatrolPointRecordUploadStatus uploadStatus;
/**巡更任务id(提交记录接口使用的参数)*/
@property (nonatomic, assign) NSInteger keepWatchMissionId;

/**日月用于显示(台账的记录详情页显示用)*/
@property (nonatomic, copy) NSString* dayMonthString;

////解析网络数据使用
@property (nonatomic, strong) YWLocation *location;
@property (nonatomic, strong) NSArray *pictures;//台账的详情页也用到

//提交记录时关联提交报障信息(解析时也用到)
@property (nonatomic, strong) NSArray *posTroubleArray;
@end

//网络数据解析用
@interface YWPatrolPointRecordJson : NSObject
/**巡更线记录标识*/
@property (nonatomic, copy) NSString* uniqueTag;
/**巡更路线对象*/
@property (nonatomic, strong) YWPatrolLine *patrolLine;
/**巡更点的记录，YWPatrolPointRecord对象*/
@property (nonatomic, strong) NSArray* details;
@end


@interface YWKeepWatchLocationRecordJson : NSObject
/**巡更明细唯一ID（关联报障信息）*/
@property (nonatomic, copy) NSString *detailUniqueTag;
//关联报障信息
@property (nonatomic, strong) NSArray *posTroubleArray;
/**执行时间*/
@property (nonatomic, assign) NSTimeInterval executeTime;
/**巡更人*/
@property (nonatomic, strong) YWHandler *executor;
/**巡更记录标识*/
@property (nonatomic, copy) NSString* uniqueTag;
/**巡更备注*/
@property (nonatomic, copy) NSString* note;
/**巡更图片*/
@property (nonatomic, strong) NSArray* pictures;
/**结果状态*/
@property (nonatomic, assign) NSInteger status;
@end
